package copyengine.ui.component.button.animation.pc
{
	import copyengine.ui.component.list.old.animation.ICEListCellRenderAnimation;
	
	import flash.display.DisplayObjectContainer;
	import flash.events.MouseEvent;
	import copyengine.ui.component.button.animation.ICESelectedButtonAnimation;

	public class CESelectedButtonFrameAnimation extends CEButtonFrameAnimation implements ICESelectedButtonAnimation
	{
		/**
		 * Selected Btn should use "selected_" as the frame prefix.
		 */
		protected static const FRAME_SELECTED_ON:String = "down";
		protected static const FRAME_SELECTED_DOWN:String = "down";
		protected static const FRAME_SELECTED_OVER:String = "down";

		private static const FRAME_UNSELECTED_ON:String = "on";
		private static const FRAME_UNSELECTED_DOWN:String = "down";
		private static const FRAME_UNSELECTED_OVER:String = "over";

		public function CESelectedButtonFrameAnimation()
		{
		}

		public function onSelectedChange(_isSelected:Boolean):void
		{
			if (_isSelected)
			{
				changeBtnFrameType(FRAME_SELECTED_ON, FRAME_SELECTED_DOWN, FRAME_SELECTED_OVER);
			}
			else
			{
				changeBtnFrameType(FRAME_UNSELECTED_ON, FRAME_UNSELECTED_DOWN, FRAME_UNSELECTED_OVER);
			}
			refreshBtn();
		}
	}
}